class BootStrapForm:

    bootstrap_class_exclude = []

    def __init__(self, *args, **kwargs):
        super().__init__(*args, *kwargs)
        for name, field in self.fields.items():
            if name in self.bootstrap_class_exclude:
                field.widget.attrs['class'] = 'color-radio'
                continue
            if name != 'mac_file':
                field.widget.attrs['class'] = 'form-control'
            # if name == 'mac_check':
            #     print(name)
            #     # field.widget.attrs['class'] = 'form-control'
            #     field.widget.attrs['type'] = 'button'
            # field.widget.attrs['id'] = 'inputSuccess1'
            # field.widget.attrs['aria-describedby'] = 'helpBlock2'
            # field.error_messages['required'] = '%s不能为空' % (field.label, )